import request from "@/utils/request";

import { LiveRoomResponse,LiveRoomWatchesResponse,LiveRoomBarrageResponse,LiveRoomGiftResponse} from '@/api/rooms/type'

enum API {
    ROOMS_PAGE_URL = "/live/rooms",
    ROOMS_WATCHES_URL = "/live/watches",
    ROOMS_GIFTS_URL = "/live/gifts",
    ROOMS_BARRAGES_URL = "/live/barrages",
    ROOMS_CLOSE_URL = "/live/close",
    ROOMS_DEL_URL = "/live/deleted",


}
 
//获取直播间的分页数据
export const reqRoomsPage = (query: any) => request.post<any, LiveRoomResponse>(API.ROOMS_PAGE_URL, query)

//获取直播间观看记录
export const reqRoomsWatchesPage = (query: any) => request.post<any, LiveRoomWatchesResponse>(API.ROOMS_WATCHES_URL, query)


//获取直播间的发送礼物记录
export const reqRoomsGiftsPage = (query: any) => request.post<any, LiveRoomGiftResponse>(API.ROOMS_GIFTS_URL, query)

//获取直播间的弹幕记录
export const reqRoomsBarragePage = (query: any) => request.post<any, LiveRoomBarrageResponse>(API.ROOMS_BARRAGES_URL,query)

// //关闭直播间
// export const reqMenuAdd = (data: any) => request.post<any, R<boolean>>(API.ROOMS_CLOSE_URL, data)

// //删除直播间
// export const reqMenuAdd = (data: any) => request.post<any, R<boolean>>(API.ROOMS_DEL_URL, data)

